package com.yonyou.cms.epc.client.entity.graphic;

import com.baomidou.mybatisplus.annotation.*;
import com.yonyou.cms.epc.client.entity.BasePO;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author jxy
 * @since 2022-06-08
 */
@TableName("tt_grade_info")
public class GradeInfoPO extends BasePO<GradeInfoPO> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    /**
     * APP_ID
     */
    @TableField(value = "APP_ID")
    private String appId;

    /**
     * 图解ID
     */
    @TableField("GRAPHIC_ID")
    private Integer graphicId;

    /**
     * 图解总成ID
     */
    @TableField("ASSEMBLY_ID")
    private Integer assemblyId;

    /**
     * 热点编号
     */
    @TableField("REDIAN_CODE")
    private String redianCode;

    /**
     * X坐标
     */
    @TableField("GRADE_X")
    private String gradeX;

    /**
     * Y坐标
     */
    @TableField("GRADE_Y")
    private String gradeY;

    /**
     * 是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public GradeInfoPO() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Integer getGraphicId() {
        return graphicId;
    }

    public void setGraphicId(Integer graphicId) {
        this.graphicId = graphicId;
    }

    public Integer getAssemblyId() {
        return assemblyId;
    }

    public void setAssemblyId(Integer assemblyId) {
        this.assemblyId = assemblyId;
    }

    public String getRedianCode() {
        return redianCode;
    }

    public void setRedianCode(String redianCode) {
        this.redianCode = redianCode;
    }

    public String getGradeX() {
        return gradeX;
    }

    public void setGradeX(String gradeX) {
        this.gradeX = gradeX;
    }

    public String getGradeY() {
        return gradeY;
    }

    public void setGradeY(String gradeY) {
        this.gradeY = gradeY;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean deleted) {
        isDeleted = deleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author jxy
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "id");
    }

}
